<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>{:C('sitename')}-下分申请</title>
	<meta name="format-detection" content="telephone=no,email=no"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
	<!-- <link href="__PUBLIC__/Admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet"> -->
	<!-- <link href="__PUBLIC__/Admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet"> -->
	<link href="__PUBLIC__/Admin/css/animate.min.css" rel="stylesheet">
	<!-- <link href="__PUBLIC__/Admin/css/style.min862f.css?v=4.1.0" rel="stylesheet"> -->
	<!-- <link href="__PUBLIC__/Home/css/page.css" rel="stylesheet"> -->
	<script src="__PUBLIC__/Home/js/flexible.js"></script>
</head>
<style type="text/css">
	/* body {
        -moz-user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
        -khtml-user-select: none;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        overflow-y: scroll;
    }
    .facesj{
        display: inline-block;
        background-color: #1fa1dc;
        width: 60px;
        height: 32px;
        line-height: 32px;
        border-radius: 3px;
        text-align: center;
        font-size: 14px;
        margin-top:6px;
        border: 1px solid #1fa1dc;
        color: #FFF;
        margin-left:10px;
    }
    .alipay_choose,.bank_choose{display: none}
    .header .ptitle{height:45px;line-height: 45px} */
	html,body{
		margin: 0;
		padding: 0;
		border: none;
		background: #fff;
	}
	label{
		float: left;
		font-size: 0.39rem;
		text-align: left;
		vertical-align: middle;
	}
	input{
		float: left;
		font-size: 0.39rem;
		color: #323332;
		vertical-align: middle;
	}
	.form-group{
		width: 82%;
		height: 1.2rem;
		margin: 0 auto;
		margin-bottom: 0.3rem;
		line-height: 1.2rem;
		padding-left: 0.2rem;
		border-bottom: 1px solid #e7e7e7;
	}
	.form-control{
		border: none;
		outline: none;
		padding: 0;
		height: 0.8rem;
		width: 5rem;
		margin-top: 0.17rem;
	}
	.type_choose{
		color: #323332;
	}
	#button{
		width: 82%;
		height: 1.2rem;
		margin: 1rem auto;
		background: linear-gradient(to right,#5eda35, #5bda31); /* 标准的语法（必须放在最后） */
		border: none !important;
		border-radius: 5px;
		display: block;
		color: #fff;
		font-size: 0.43rem;
	}

	footer {
		width: 10rem;
		height: 1.33rem;
		left: 50%;
		transform: translate(-50%);
		background-color: #131314;
		position: fixed;
		bottom: 0;
		z-index: 1111;
		display: flex;
		justify-content: space-around;
		box-sizing: border-box;
		padding: 5px 0;
	}

	footer a {
		color: #fff98d;
		display: block;
		text-align: center;
		text-decoration: none;
		-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
		-webkit-user-select: none;
		-moz-user-focus: none;
		-moz-user-select: none;
		font-size: 0.246rem;
	}
	footer a p{
		color: #fff98d;
		margin: 0;
	}
	footer a img{
		width:0.72rem;
		height: 0.653rem;
	}
	.black_overlay4{
		display: none;
		position: absolute;
		top: 0%;
		left: 0%;
		width: 100%;
		height: 100%;
		background-color: black;
		z-index:100111;
		-moz-opacity: 0.8;
		opacity:.80;
		filter: alpha(opacity=88);
	}
	.white_content4 {
		display: none;
		position: absolute;
		top: 35%;
		/* left: 25%; */
		bottom: 0;
		width: 10rem;
		height: 14.33rem;
		/* padding: 20px; */
		/* border: 10px solid orange; */
		background-color: #262626;
		z-index:100211;
		/* overflow: auto; */
		border-top: 2px solid #ffe668;
	}
	.close4{
		display: none;
		width: 0.88rem;
		height: 2.09rem;
		position: absolute;
		top:24%;
		left:50%;
		bottom: 13.24rem;
		z-index: 111111;
		transform: translate(-0.44rem);
	}
	#light4>p{
		width: 10rem;
		margin: 0;
		height: 1.06rem;
		border-bottom: 1px solid #67603a;
		text-align: center;
		line-height: 1.06rem;
		font-size: 0.546rem;
		color: #ffe668;
	}
	header{
		width: 100%;
		height: 2.4rem;
		position: fixed;
		left: 0;
		bottom: 0;
		display: flex;
		justify-content: space-around;
		align-items: center;
		padding: 0.8rem 48px;
		box-sizing: border-box;
	}
	nav,#button{
		width: 128px;
		height: 32px;
		line-height: 32px;
		font-weight: 480;
		font-size: 14px;
		border-radius: 4px;
		color: #fff;
		border: none;
		outline: none;
	}
	nav{
		background-color: #b7b7b7;
		height: 100%;
	}
	header nav a{
		width: 100%;
		height: 100%;
		display: block;
		text-align: center;
		font-size: 0.4rem;
		text-decoration: none;
		line-height: 32px;
		font-weight: 480;
		font-size: 14px;
		border-radius: 4px;
		color: #fff;
		border: none;
		outline: none;
		/* position: absolute; */
		/* left: 0.3rem; */
		-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
		-webkit-user-select: none;
		-moz-user-focus: none;
		-moz-user-select: none;
	}
</style>
<body>
<!-- <div class="header">
  <div class="all_w ">
    <div class="gofh"> <a href="javascript:history.back()"><img src="/Public/Home/img/jt_03.jpg"></a> </div>
    <div class="ptitle">
      下分申请
      <a href="{:U('Home/Fen/addpage')}" class="backgame">上分</a>
    </div>
  </div>
</div> -->
<form class="m-t form-horizontal " role="form" method="post" action="{:U('Home/Fen/xia')}" id="LoginForm">
	<div class="middle-box text-center loginscreen  animated fadeInDown" style="padding-top:0.6rem;">
		<div>
			<div class="form-group">
				<label class="col-sm-2 control-label">nickname：&#x3000;&#x3000;&#x3000;&#x3000;</label>
				<div class="col-sm-6" style="font-size: 0.39rem;">
					{$userinfo.nickname}
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-2 control-label">Balance：&#x3000;&#x3000;</label>
				<div class="col-sm-6 points" style="font-size: 0.39rem;">
					{$userinfo.points}
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-2 control-label">money：&#x3000;&#x3000;</label>
				<div class="col-sm-6" >
					<input type="text" id="money" name="money" class="form-control" required  onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'0')}else{this.value=this.value.replace(/\D/g,'')}">
				</div>
			</div>


			<div class="form-group">
				<label class="col-sm-2 control-label">type：&#x3000;&#x3000;</label>
				<div class="col-sm-6" >
					<select name="type" class="form-control type_choose">
						<option value="1">Wechat</option>
						<option value="2">Alipay</option>
						<option value="3">Bank card</option>
					</select>
				</div>
			</div>

			<div class="form-group wx_choose">
				<label class="col-sm-2 control-label" >WeChat：&#x3000;&#x3000;</label>
				<div class="col-sm-6">
					<input type="text" id="wx_account" name="wx_account" class="form-control"  >
				</div>
			</div>

			<div class="form-group alipay_choose" style="display:none;">
				<label class="col-sm-2 control-label" >Alipay：&#x3000;</label>
				<div class="col-sm-6" >
					<input type="text" id="alipay_account" name="alipay_account" class="form-control"  >
				</div>
			</div>

			<div class="bank_choose" style="display:none;">
				<div class="form-group">
					<label class="col-sm-2 control-label">account：&#x3000;&#x3000;</label>
					<div class="col-sm-6">
						<input type="text" id="bank_account" name="bank_account" class="form-control"  >
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label">Bank：&#x3000;&#x3000;&#x3000;</label>
					<div class="col-sm-6" >
						<input type="text" id="back_address" name="back_address" class="form-control"  >
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label">Payee：&#x3000;&#x3000;&#x3000;</label>
					<div class="col-sm-6">
						<input type="text" id="back_name" name="back_name" class="form-control"  >
					</div>
				</div>
			</div>
			<input type="hidden" name="uid" value="{$userinfo.id}">
		</div>
	</div>
	<header>
		<nav>
			<a href="/Home/User/index">return</a>
		</nav>
		<button type="submit" class="btn btn-success block full-width m-b" id="button" style="background: #08c261;">Sub-application</button>
	</header>
</form>
<!-- <footer>
    <a href=" /Home/Run/index"><img src="__PUBLIC__/Home/img/11.png" alt="">
        <p>主页</p>
    </a>
    <a href=" {:U('Home/Run/active')}"><img src="__PUBLIC__/Home/img/12.png" alt="">
        <p>优惠活动</p>
    </a>
    <a href=" {:U('Home/User/index')}"><img src="__PUBLIC__/Home/img/13.png" alt="" >
        <p>个人中心</p>
    </a>
    <a href="#"  onclick ="openKefu()"><img src="__PUBLIC__/Home/img/14.png" alt="" >
        <p>在线客服</p>
    </a>
</footer>
<a href = "javascript:void(0)" onclick = "closeKefu()"><img src="__PUBLIC__/Home/img/close.png" alt=""  id="close4" class="close4">
</a>
        <div id="light4" class="white_content4">
            <p>在线客服</p>
   <img src="__PUBLIC__/Home/img/kefu1.jpg" alt="" style="display:block;width:6.33rem;height:8.26rem;margin:0.3rem auto;">
           </div>
        <div id="fade4" class="black_overlay4"></div> -->
<script src="__PUBLIC__/Admin/js/jquery.min.js?v=2.1.4"></script>
<!-- <script src="__PUBLIC__/Admin/js/bootstrap.min.js?v=3.3.6"></script> -->
<script src="__PUBLIC__/Home/js/flexible.js"></script>
<script src="__PUBLIC__/Common/js/ajaxForm.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<script>

	function openKefu(){
		document.getElementById('light4').style.display='block';
		document.getElementById('fade4').style.display='block';
		document.getElementById('close4').style.display='block';
	}
	function closeKefu(){
		document.getElementById('light4').style.display='none';
		document.getElementById('fade4').style.display='none';
		document.getElementById('close4').style.display='none';
	}
</script>
<script type="text/javascript">
	$('.type_choose').change(function(){
		var index = $(this).val();
		if (index == 1) {
			$('.wx_choose').show();
			$('.alipay_choose').hide();
			$('.bank_choose').hide();
		} else if(index ==2){
			$('.wx_choose').hide();
			$('.alipay_choose').show();
			$('.bank_choose').hide();
		} else {
			$('.wx_choose').hide();
			$('.alipay_choose').hide();
			$('.bank_choose').show();
		}
	})

	$(function(){
		$('#LoginForm').ajaxForm({
			beforeSubmit: checkForm,
			success: complete,
			dataType: 'json'
		});
		function checkForm(){
			if ($("#money").val() > parseInt($('.points').text())) {
				layer.alert('Sorry, your credit is running low', {icon: 5}, function(index){
					layer.close(index);
					$('#money').focus();
				});
				return false;
			}
		}
		function complete(data){
			if(data.status==1){
				$('.btn').attr('disabled','disabled');
				layer.msg(data.info, function(index){
					layer.close(index);
					window.location.href=data.url;
				});
			}else{
				layer.msg(data.info);
				$('#password').val('').focus();
				return false;
			}
		}
	});
</script>
</body>

</html>